package com.example.vv.model.login.base.contract;

import com.example.vv.frameWork.base.BaseView;
import com.example.vv.frameWork.entity.LoginEntity;
import com.example.vv.frameWork.net.API_FACTORY;
import com.example.vv.req.REQ_LOGIN;
import com.example.vv.res.BaseRespont;

import java.util.Map;

import io.reactivex.Observable;

public interface LoginContract {
    interface Model {
        default Observable<BaseRespont> login(REQ_LOGIN req_login){
            return API_FACTORY.POST_API_LOGIN(req_login);
        }
    }

    interface View extends BaseView {
        /**
         * @return 手机
         */
        String getPhone();

        /**
         * @return 密码
         */
        String getUserPassWord();

        void setLoginEntity(LoginEntity loginEntity);
    }

    interface Presenter {
        /**
         * 登录请求
         */
        void login();

        /**
         * @return 判断格式是否正确
         */
        boolean isFormat();
    }
}
